;--- include file created by h2incx v0.82, copyright 2005 japheth
;--- source file: TlHelp32.h, last modified: 5/23/2001 19:38

ifndef _INC_TOOLHELP32
_INC_TOOLHELP32	EQU	<>

MAX_MODULE_NAME32	EQU	255

TH32CS_SNAPHEAPLIST	EQU	00000001h
TH32CS_SNAPPROCESS	EQU	00000002h
TH32CS_SNAPTHREAD	EQU	00000004h
TH32CS_SNAPMODULE	EQU	00000008h
TH32CS_SNAPMODULE32	EQU	00000010h
TH32CS_SNAPALL	EQU	( TH32CS_SNAPHEAPLIST  or  TH32CS_SNAPPROCESS  or  TH32CS_SNAPTHREAD  or  TH32CS_SNAPMODULE )
TH32CS_INHERIT	EQU	80000000h

HEAPLIST32	struct
dwSize	SIZE_T	?
th32ProcessID	DWORD	?
th32HeapID	ULONG_PTR	?
dwFlags	DWORD	?
HEAPLIST32	ends

PHEAPLIST32  typedef ptr HEAPLIST32
LPHEAPLIST32  typedef ptr HEAPLIST32

HF32_DEFAULT	EQU	1
HF32_SHARED	EQU	2

HEAPENTRY32	struct
dwSize	SIZE_T	?
hHandle	HANDLE	?
dwAddress	ULONG_PTR	?
dwBlockSize	SIZE_T	?
dwFlags	DWORD	?
dwLockCount	DWORD	?
dwResvd	DWORD	?
th32ProcessID	DWORD	?
th32HeapID	ULONG_PTR	?
HEAPENTRY32	ends

PHEAPENTRY32  typedef ptr HEAPENTRY32
LPHEAPENTRY32  typedef ptr HEAPENTRY32

LF32_FIXED	EQU	00000001h
LF32_FREE	EQU	00000002h
LF32_MOVEABLE	EQU	00000004h

PROCESSENTRY32W	struct
dwSize	DWORD	?
cntUsage	DWORD	?
th32ProcessID	DWORD	?
th32DefaultHeapID	ULONG_PTR	?
th32ModuleID	DWORD	?
cntThreads	DWORD	?
th32ParentProcessID	DWORD	?
pcPriClassBase	SDWORD	?
dwFlags	DWORD	?
szExeFile	WCHAR MAX_PATH dup (?)
PROCESSENTRY32W	ends

PPROCESSENTRY32W  typedef ptr PROCESSENTRY32W
LPPROCESSENTRY32W  typedef ptr PROCESSENTRY32W

PROCESSENTRY32	struct
dwSize	DWORD	?
cntUsage	DWORD	?
th32ProcessID	DWORD	?
th32DefaultHeapID	ULONG_PTR	?
th32ModuleID	DWORD	?
cntThreads	DWORD	?
th32ParentProcessID	DWORD	?
pcPriClassBase	SDWORD	?
dwFlags	DWORD	?
szExeFile	CHAR MAX_PATH dup (?)
PROCESSENTRY32	ends

PPROCESSENTRY32  typedef ptr PROCESSENTRY32
LPPROCESSENTRY32  typedef ptr PROCESSENTRY32

ifdef UNICODE 
Process32First	EQU	<Process32FirstW>
Process32Next	EQU	<Process32NextW>
PROCESSENTRY32	EQU	<PROCESSENTRY32W>
PPROCESSENTRY32	EQU	<PPROCESSENTRY32W>
LPPROCESSENTRY32	EQU	<LPPROCESSENTRY32W>
endif 

THREADENTRY32	struct
dwSize	DWORD	?
cntUsage	DWORD	?
th32ThreadID	DWORD	?
th32OwnerProcessID	DWORD	?
tpBasePri	SDWORD	?
tpDeltaPri	SDWORD	?
dwFlags	DWORD	?
THREADENTRY32	ends

PTHREADENTRY32  typedef ptr THREADENTRY32
LPTHREADENTRY32  typedef ptr THREADENTRY32

MODULEENTRY32W	struct
dwSize	DWORD	?
th32ModuleID	DWORD	?
th32ProcessID	DWORD	?
GlblcntUsage	DWORD	?
ProccntUsage	DWORD	?
modBaseAddr	LPBYTE	?
modBaseSize	DWORD	?
hModule	HMODULE	?
szModule	WCHAR MAX_MODULE_NAME32+1 dup (?)
szExePath	WCHAR MAX_PATH dup (?)
MODULEENTRY32W	ends

PMODULEENTRY32W  typedef ptr MODULEENTRY32W
LPMODULEENTRY32W  typedef ptr MODULEENTRY32W

MODULEENTRY32	struct
dwSize	DWORD	?
th32ModuleID	DWORD	?
th32ProcessID	DWORD	?
GlblcntUsage	DWORD	?
ProccntUsage	DWORD	?
modBaseAddr	LPBYTE	?
modBaseSize	DWORD	?
hModule	HMODULE	?
szModule	SBYTE MAX_MODULE_NAME32+1 dup (?)
szExePath	SBYTE MAX_PATH dup (?)
MODULEENTRY32	ends

PMODULEENTRY32  typedef ptr MODULEENTRY32
LPMODULEENTRY32  typedef ptr MODULEENTRY32

ifdef UNICODE 
Module32First	EQU	<Module32FirstW>
Module32Next	EQU	<Module32NextW>
MODULEENTRY32	EQU	<MODULEENTRY32W>
PMODULEENTRY32	EQU	<PMODULEENTRY32W>
LPMODULEENTRY32	EQU	<LPMODULEENTRY32W>
endif 

@DefProto WINBASEAPI, CreateToolhelp32Snapshot, WINSTDCALLCONV, , <:DWORD, :DWORD>, 8
@DefProto WINBASEAPI, Heap32ListFirst, WINSTDCALLCONV, , <:HANDLE, :LPHEAPLIST32>, 8
@DefProto WINBASEAPI, Heap32ListNext, WINSTDCALLCONV, , <:HANDLE, :LPHEAPLIST32>, 8
@DefProto WINBASEAPI, Heap32First, WINSTDCALLCONV, , <:LPHEAPENTRY32, :DWORD, :ULONG_PTR>, 12
@DefProto WINBASEAPI, Heap32Next, WINSTDCALLCONV, , <:LPHEAPENTRY32>, 4
@DefProto WINBASEAPI, Toolhelp32ReadProcessMemory, WINSTDCALLCONV, , <:DWORD, :LPCVOID, :LPVOID, :SIZE_T, :ptr SIZE_T>, 20
@DefProto WINBASEAPI, Process32FirstW, WINSTDCALLCONV, , <:HANDLE, :LPPROCESSENTRY32W>, 8
@DefProto WINBASEAPI, Process32NextW, WINSTDCALLCONV, , <:HANDLE, :LPPROCESSENTRY32W>, 8
@DefProto WINBASEAPI, Process32First, WINSTDCALLCONV, , <:HANDLE, :LPPROCESSENTRY32>, 8
@DefProto WINBASEAPI, Process32Next, WINSTDCALLCONV, , <:HANDLE, :LPPROCESSENTRY32>, 8
@DefProto WINBASEAPI, Thread32First, WINSTDCALLCONV, , <:HANDLE, :LPTHREADENTRY32>, 8
@DefProto WINBASEAPI, Thread32Next, WINSTDCALLCONV, , <:HANDLE, :LPTHREADENTRY32>, 8
@DefProto WINBASEAPI, Module32FirstW, WINSTDCALLCONV, , <:HANDLE, :LPMODULEENTRY32W>, 8
@DefProto WINBASEAPI, Module32NextW, WINSTDCALLCONV, , <:HANDLE, :LPMODULEENTRY32W>, 8
@DefProto WINBASEAPI, Module32First, WINSTDCALLCONV, , <:HANDLE, :LPMODULEENTRY32>, 8
@DefProto WINBASEAPI, Module32Next, WINSTDCALLCONV, , <:HANDLE, :LPMODULEENTRY32>, 8

endif 
